'''
适配器：满足需求方的抽象类，适配器
'''
from adaptedObject import OrginalData
from abc import abstractmethod, ABC


class AbstractHandle(object):
    '''需求方所想要的返回'''
    @abstractmethod
    def outputList(self):
        '''希望返回一个list'''
        pass


class Adapter(OrginalData, AbstractHandle):
    
    def outputList(self):
        orgi = self.outputDict()
        if orgi is None:
            return []

        return list(orgi.values())